package trabajoISW2.presentation.shared;

import trabajoISW2.domain.implementations.Detail;

public class DetailMapper {
	
	public static DetailDTO createDTO(Detail d){
		return new DetailDTO(BookMapper.createDTO(d.getBook()), d.getQuantity());
		
	}
	
	public static Detail updateDomainObject(DetailDTO dto){
		return new Detail (dto.getQuantity(), BookMapper.updateDomainObject(dto.getBook()));
	}

}
